#include "ScriptedPch.h"
#include "buffNPC.h"

/*
	Buffs:

	-	Großer Segen der Macht		48934
	-	Großer Segen der Könige		25898
	-	Großer Segen der Weisheit	48938
	-	Großer Segen des Refugiums	25899
		---
	-	Gebet der Seelenstärke		48162
	-	Gebet der Willenskraft		48074
	-	Gebet des Schattenschutzes	48170
		---
	-	Mal der Wildnis				48470

*/

bool GossipHello_buffNPC(Player* pPlayer, Creature* pCreature)
{
	if (pPlayer->isInCombat())
	{
		pPlayer->SEND_GOSSIP_MENU(40033, pCreature->GetGUID());
		return true;
	}
	else
	{	
		pPlayer->ADD_GOSSIP_ITEM(0, "Ja, Ich brauche Buffs.", GOSSIP_SENDER_MAIN, buffs);
		pPlayer->ADD_GOSSIP_ITEM(0, "Nein, ich habe kein Interesse.", GOSSIP_SENDER_MAIN, closemenu);

		pPlayer->SEND_GOSSIP_MENU(40034, pCreature->GetGUID());
		return true;
	}
}
bool GossipSelect_buffNPC(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
{
	switch(action)
	{

	case buffs:
		pPlayer->ADD_GOSSIP_ITEM(3, "Segen der Macht", GOSSIP_SENDER_MAIN, gsdm);
		pPlayer->ADD_GOSSIP_ITEM(3, "Segen der Koenige", GOSSIP_SENDER_MAIN, gsdk);
		pPlayer->ADD_GOSSIP_ITEM(3, "Segen der Weissheit", GOSSIP_SENDER_MAIN, gsdw);
		pPlayer->ADD_GOSSIP_ITEM(3, "Segen des Refugiums", GOSSIP_SENDER_MAIN, gsdr);
		pPlayer->ADD_GOSSIP_ITEM(3, "Arkane Intelligenz", GOSSIP_SENDER_MAIN, ai);
		pPlayer->ADD_GOSSIP_ITEM(3, "Buff-Packet (Priester & Druiden Buffs)", GOSSIP_SENDER_MAIN, buffpkt1);
		pPlayer->ADD_GOSSIP_ITEM(0, "Ich habe es mir anders überlegt.", GOSSIP_SENDER_MAIN, closemenu);


		pPlayer->SEND_GOSSIP_MENU(40035, pCreature->GetGUID());
		break;

	case gsdm:
		pPlayer->CastSpell(pPlayer, 48934, true);

		pPlayer->ADD_GOSSIP_ITEM(0, "Ja, gerne.", GOSSIP_SENDER_MAIN, buffs);
		pPlayer->ADD_GOSSIP_ITEM(0, "Nein, ich habe kein Interesse.", GOSSIP_SENDER_MAIN, closemenu);
		pPlayer->SEND_GOSSIP_MENU(40036, pCreature->GetGUID());
		return true;

	case gsdk:
		pPlayer->CastSpell(pPlayer, 25898, true);

		pPlayer->ADD_GOSSIP_ITEM(0, "Ja, gerne.", GOSSIP_SENDER_MAIN, buffs);
		pPlayer->ADD_GOSSIP_ITEM(0, "Nein, ich habe kein Interesse.", GOSSIP_SENDER_MAIN, closemenu);
		pPlayer->SEND_GOSSIP_MENU(40036, pCreature->GetGUID());
		return true;

	case gsdw:
		pPlayer->CastSpell(pPlayer, 48938, true);

		pPlayer->ADD_GOSSIP_ITEM(0, "Ja, gerne.", GOSSIP_SENDER_MAIN, buffs);
		pPlayer->ADD_GOSSIP_ITEM(0, "Nein, ich habe kein Interesse.", GOSSIP_SENDER_MAIN, closemenu);
		pPlayer->SEND_GOSSIP_MENU(40036, pCreature->GetGUID());
		return true;

	case gsdr:
		pPlayer->CastSpell(pPlayer, 25899, true);

		pPlayer->ADD_GOSSIP_ITEM(0, "Ja, gerne.", GOSSIP_SENDER_MAIN, buffs);
		pPlayer->ADD_GOSSIP_ITEM(0, "Nein, ich habe kein Interesse.", GOSSIP_SENDER_MAIN, closemenu);
		pPlayer->SEND_GOSSIP_MENU(40036, pCreature->GetGUID());
		return true;

	case ai:
		pPlayer->CastSpell(pPlayer, 42995, true);

		pPlayer->ADD_GOSSIP_ITEM(0, "Ja, gerne.", GOSSIP_SENDER_MAIN, buffs);
		pPlayer->ADD_GOSSIP_ITEM(0, "Nein, ich habe kein Interesse.", GOSSIP_SENDER_MAIN, closemenu);
		pPlayer->SEND_GOSSIP_MENU(40036, pCreature->GetGUID());
		return true;

	case buffpkt1:
		pPlayer->CastSpell(pPlayer, 48162, true);
		pPlayer->CastSpell(pPlayer, 48074, true);
		pPlayer->CastSpell(pPlayer, 48170, true);
		pPlayer->CastSpell(pPlayer, 48470, true);

		pPlayer->ADD_GOSSIP_ITEM(0, "Ja, gerne.", GOSSIP_SENDER_MAIN, buffs);
		pPlayer->ADD_GOSSIP_ITEM(0, "Nein, ich habe kein Interesse.", GOSSIP_SENDER_MAIN, closemenu);
		pPlayer->SEND_GOSSIP_MENU(40036, pCreature->GetGUID());
		return true;

	case closemenu:
		pPlayer->CLOSE_GOSSIP_MENU();break;
		return true;
	}

return true;
}

void AddSC_buffNPC()
{
    Script *newscript;
    newscript = new Script;
    newscript->Name = "buffNPC";
    newscript->pGossipHello = &GossipHello_buffNPC;
    newscript->pGossipSelect = &GossipSelect_buffNPC;
    newscript->RegisterSelf();
}
